(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

empty(nil) → true
empty(cons(x, l)) → false
head(cons(x, l)) → x
tail(nil) → nil
tail(cons(x, l)) → l
rev(nil) → nil
rev(cons(x, l)) → cons(rev1(x, l), rev2(x, l))
last(x, l) → if(empty(l), x, l)
if(true, x, l) → x
if(false, x, l) → last(head(l), tail(l))
rev2(x, nil) → nil
rev2(x, cons(y, l)) → rev(cons(x, rev2(y, l)))

Rewrite Strategy: FULL

(1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(2n):
The rewrite sequence
rev2(x, cons(y, l)) →+ cons(rev1(x, rev2(y, l)), rev2(x, rev2(y, l)))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0,1].
The pumping substitution is [l / cons(y, l)].
The result substitution is [x / y].

The rewrite sequence
rev2(x, cons(y, l)) →+ cons(rev1(x, rev2(y, l)), rev2(x, rev2(y, l)))
gives rise to a decreasing loop by considering the right hand sides subterm at position [1,1].
The pumping substitution is [l / cons(y, l)].
The result substitution is [x / y].

(2) BOUNDS(2^n, INF)

(3) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(4) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

empty(nil) → true
empty(cons(x, l)) → false
head(cons(x, l)) → x
tail(nil) → nil
tail(cons(x, l)) → l
rev(nil) → nil
rev(cons(x, l)) → cons(rev1(x, l), rev2(x, l))
last(x, l) → if(empty(l), x, l)
if(true, x, l) → x
if(false, x, l) → last(head(l), tail(l))
rev2(x, nil) → nil
rev2(x, cons(y, l)) → rev(cons(x, rev2(y, l)))

S is empty.
Rewrite Strategy: FULL

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

TRS:
Rules:
empty(nil) → true
empty(cons(x, l)) → false
head(cons(x, l)) → x
tail(nil) → nil
tail(cons(x, l)) → l
rev(nil) → nil
rev(cons(x, l)) → cons(rev1(x, l), rev2(x, l))
last(x, l) → if(empty(l), x, l)
if(true, x, l) → x
if(false, x, l) → last(head(l), tail(l))
rev2(x, nil) → nil
rev2(x, cons(y, l)) → rev(cons(x, rev2(y, l)))

Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: rev1 → nil:cons → nil:cons
false :: true:false
head :: nil:cons → rev1
tail :: nil:cons → nil:cons
rev :: nil:cons → nil:cons
rev1 :: rev1 → nil:cons → rev1
rev2 :: rev1 → nil:cons → nil:cons
last :: rev1 → nil:cons → rev1
if :: true:false → rev1 → nil:cons → rev1
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_rev13_0 :: rev1
gen_nil:cons4_0 :: Nat → nil:cons
gen_rev15_0 :: Nat → rev1

(7) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
rev, rev2, last

They will be analysed ascendingly in the following order:
rev = rev2

(8) Obligation:

TRS:
Rules:
empty(nil) → true
empty(cons(x, l)) → false
head(cons(x, l)) → x
tail(nil) → nil
tail(cons(x, l)) → l
rev(nil) → nil
rev(cons(x, l)) → cons(rev1(x, l), rev2(x, l))
last(x, l) → if(empty(l), x, l)
if(true, x, l) → x
if(false, x, l) → last(head(l), tail(l))
rev2(x, nil) → nil
rev2(x, cons(y, l)) → rev(cons(x, rev2(y, l)))

Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: rev1 → nil:cons → nil:cons
false :: true:false
head :: nil:cons → rev1
tail :: nil:cons → nil:cons
rev :: nil:cons → nil:cons
rev1 :: rev1 → nil:cons → rev1
rev2 :: rev1 → nil:cons → nil:cons
last :: rev1 → nil:cons → rev1
if :: true:false → rev1 → nil:cons → rev1
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_rev13_0 :: rev1
gen_nil:cons4_0 :: Nat → nil:cons
gen_rev15_0 :: Nat → rev1

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(hole_rev13_0, gen_nil:cons4_0(x))
gen_rev15_0(0) ⇔ hole_rev13_0
gen_rev15_0(+(x, 1)) ⇔ rev1(gen_rev15_0(x), nil)

The following defined symbols remain to be analysed:
last, rev, rev2

They will be analysed ascendingly in the following order:
rev = rev2

(9) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol last.

(10) Obligation:

TRS:
Rules:
empty(nil) → true
empty(cons(x, l)) → false
head(cons(x, l)) → x
tail(nil) → nil
tail(cons(x, l)) → l
rev(nil) → nil
rev(cons(x, l)) → cons(rev1(x, l), rev2(x, l))
last(x, l) → if(empty(l), x, l)
if(true, x, l) → x
if(false, x, l) → last(head(l), tail(l))
rev2(x, nil) → nil
rev2(x, cons(y, l)) → rev(cons(x, rev2(y, l)))

Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: rev1 → nil:cons → nil:cons
false :: true:false
head :: nil:cons → rev1
tail :: nil:cons → nil:cons
rev :: nil:cons → nil:cons
rev1 :: rev1 → nil:cons → rev1
rev2 :: rev1 → nil:cons → nil:cons
last :: rev1 → nil:cons → rev1
if :: true:false → rev1 → nil:cons → rev1
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_rev13_0 :: rev1
gen_nil:cons4_0 :: Nat → nil:cons
gen_rev15_0 :: Nat → rev1

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(hole_rev13_0, gen_nil:cons4_0(x))
gen_rev15_0(0) ⇔ hole_rev13_0
gen_rev15_0(+(x, 1)) ⇔ rev1(gen_rev15_0(x), nil)

The following defined symbols remain to be analysed:
rev2, rev

They will be analysed ascendingly in the following order:
rev = rev2

(11) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol rev2.

(12) Obligation:

TRS:
Rules:
empty(nil) → true
empty(cons(x, l)) → false
head(cons(x, l)) → x
tail(nil) → nil
tail(cons(x, l)) → l
rev(nil) → nil
rev(cons(x, l)) → cons(rev1(x, l), rev2(x, l))
last(x, l) → if(empty(l), x, l)
if(true, x, l) → x
if(false, x, l) → last(head(l), tail(l))
rev2(x, nil) → nil
rev2(x, cons(y, l)) → rev(cons(x, rev2(y, l)))

Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: rev1 → nil:cons → nil:cons
false :: true:false
head :: nil:cons → rev1
tail :: nil:cons → nil:cons
rev :: nil:cons → nil:cons
rev1 :: rev1 → nil:cons → rev1
rev2 :: rev1 → nil:cons → nil:cons
last :: rev1 → nil:cons → rev1
if :: true:false → rev1 → nil:cons → rev1
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_rev13_0 :: rev1
gen_nil:cons4_0 :: Nat → nil:cons
gen_rev15_0 :: Nat → rev1

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(hole_rev13_0, gen_nil:cons4_0(x))
gen_rev15_0(0) ⇔ hole_rev13_0
gen_rev15_0(+(x, 1)) ⇔ rev1(gen_rev15_0(x), nil)

The following defined symbols remain to be analysed:
rev

They will be analysed ascendingly in the following order:
rev = rev2

(13) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol rev.

(14) Obligation:

TRS:
Rules:
empty(nil) → true
empty(cons(x, l)) → false
head(cons(x, l)) → x
tail(nil) → nil
tail(cons(x, l)) → l
rev(nil) → nil
rev(cons(x, l)) → cons(rev1(x, l), rev2(x, l))
last(x, l) → if(empty(l), x, l)
if(true, x, l) → x
if(false, x, l) → last(head(l), tail(l))
rev2(x, nil) → nil
rev2(x, cons(y, l)) → rev(cons(x, rev2(y, l)))

Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: rev1 → nil:cons → nil:cons
false :: true:false
head :: nil:cons → rev1
tail :: nil:cons → nil:cons
rev :: nil:cons → nil:cons
rev1 :: rev1 → nil:cons → rev1
rev2 :: rev1 → nil:cons → nil:cons
last :: rev1 → nil:cons → rev1
if :: true:false → rev1 → nil:cons → rev1
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_rev13_0 :: rev1
gen_nil:cons4_0 :: Nat → nil:cons
gen_rev15_0 :: Nat → rev1

Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(hole_rev13_0, gen_nil:cons4_0(x))
gen_rev15_0(0) ⇔ hole_rev13_0
gen_rev15_0(+(x, 1)) ⇔ rev1(gen_rev15_0(x), nil)

No more defined symbols left to analyse.